Audio Class Reference

#include <Audio.h>

List of all members.

Public Member Functions

 Audio ()
int initSound ()
void exitOpenAL ()
void killALData ()
int getSoundId ()
int getSoundCrashId ()

Private Attributes

ALuint sound_id
ALuint sound_crash_id
int play_flag
ALuint boom [2]
ALCdevice * dev
ALvoid * data
ALCcontext * context_id
ALuint moving_source [2]


Detailed Description

A Audio class.This class is used for managing audio operations.

Definition at line 5 of file Audio.h.


Constructor & Destructor Documentation

Audio::Audio (   ) 
 

A constructor. Initializes context_id.

Definition at line 2 of file Audio.cpp.

References context_id.


Member Function Documentation

void Audio::exitOpenAL (   ) 
 

make exiting operations from the sources, devices, and sound data.

Definition at line 76 of file Audio.cpp.

int Audio::getSoundCrashId (   ) 
 

returns sound id of the crash sound effect.

Returns:
sound_crash_id

Definition at line 100 of file Audio.cpp.

References sound_crash_id.

int Audio::getSoundId (   ) 
 

returns sound id of the background music.

Returns:
sound_id

Definition at line 95 of file Audio.cpp.

References sound_id.

int Audio::initSound (   ) 
 

make initialization operations about the sources, devices, and sound data.

Returns:
Operation success

Definition at line 7 of file Audio.cpp.

References boom, context_id, data, dev, moving_source, sound_crash_id, and sound_id.

Referenced by AnimationWindow::AnimationWindow().

void Audio::killALData (   ) 
 

delete all the buffers about the sound operation.

Definition at line 87 of file Audio.cpp.

References boom, and moving_source.

Referenced by AnimationWindow::exit().


Member Data Documentation

ALuint Audio::boom[2] [private]
 

a private ALuint array. It holds sound datas.

Definition at line 31 of file Audio.h.

Referenced by initSound(), and killALData().

ALCcontext* Audio::context_id [private]
 

Definition at line 44 of file Audio.h.

Referenced by Audio(), and initSound().

ALvoid* Audio::data [private]
 

a private ALuint array. Pointer to the audio data.

Definition at line 43 of file Audio.h.

Referenced by initSound().

ALCdevice* Audio::dev [private]
 

a private ALuint array. It shows audio device.

Definition at line 37 of file Audio.h.

Referenced by initSound().

ALuint Audio::moving_source[2] [private]
 

a private ALuint array. Pointer to an array of ALuint values which will store the names of the new sources.

Definition at line 50 of file Audio.h.

Referenced by initSound(), and killALData().

int Audio::play_flag [private]
 

a private variable. It shows if the music is played before.

Definition at line 25 of file Audio.h.

ALuint Audio::sound_crash_id [private]
 

a private variable. It holds id of the crash sound effect.

Definition at line 19 of file Audio.h.

Referenced by getSoundCrashId(), and initSound().

ALuint Audio::sound_id [private]
 

a private variable. It holds id of the background music.

Definition at line 13 of file Audio.h.

Referenced by getSoundId(), and initSound().


The documentation for this class was generated from the following files:
Generated on Sun May 28 18:54:12 2006 for TraffEdu by  doxygen 1.4.6-NO